
export default {
  data() {
    return {
      // 全局按钮
      overallBtn: [
        {
          label: "新增",
          mthods: () => this.addDictionary(),
          icon: "el-icon-plus",
          type: "primary"
        }
      ]

    };
  },
  methods: {
    addDictionary() {
      if (!this.selectTree.names) {
        this.$message.warning("请先选择左侧数据");
        return;
      }
      this.editForm.options[2].attrs.disabled = false;
      const { names, id } = this.selectTree;
      this.editForm.options[1].value = names;
      this.editForm.options[3].value = id;
      this.editForm.visible = true;
    }
  }

};
